package cn.zqgx.moniter.center.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Description: 读取系统的配置文件
 * @Author: yanakai@126.com
 * @CreateDate: 2022/11/1 15:20
 * @UpdateUser: yanakai@126.com
 * @UpdateDate: 2022/11/1 15:20
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Component
@ConfigurationProperties(prefix = "moniter")
public class MoniterConfig {

    /**
     * 项目名称
     */
    private String title;

    /** 版本 */
    private String version;

    /** 上传路径 */
    private static String profile;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public static String getProfile(){
        return profile;
    }

    public void setProfile(String profile) {
        MoniterConfig.profile = profile;
    }



    /**
     * 获取上传路径
     */
    public static String getUploadPath()
    {
        return getProfile() + "/upload";
    }
}
